package com.sfeir.poc.portal.gui.client.widgets;

/**
 * Used as youtube widget representation.
 * Just build an iframe with the url of the video for the moment
 * Maybe could it be great to create a real widget using Youtube api in order to get
 * more more functionalities 
 * @author bostoen.v
 *
 */
public class YoutubeWidget extends SimpleHTMLWidget {

	public YoutubeWidget(String url) {
		super(url);
	}

	/**
	 * Build an iframe that refer the video corresponding to the url param
	 */
	protected String getHtml(String url) {
		return "<object width=\"100%\" height=\"344\"><param name=\"movie\" value=\"" + url + "\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"" + url + "\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"100%\" height=\"344\"></embed></object>";
	}
}
